package com.app.db;

import com.app.db.dao.DaoMaster;
import com.app.ui.activity.base.BaseApplication;

/**
 * Created by Administrator on 2016/10/14.
 */
public abstract class BaseDBManager {
     private static DaoMaster daoMaster;

    public  static DaoMaster getDM() {
        if (daoMaster == null) {
            DaoMaster.DevOpenHelper devOpenHelper = new DaoMaster.DevOpenHelper(BaseApplication.context,
                    "ma", null);
            daoMaster = new DaoMaster(devOpenHelper.getWritableDatabase());
        }
        return daoMaster;
    }
}
